package com.team2.s3hrjyxm.QxglService;

import com.team2.s3hrjyxm.dao.RoleDao;
import com.team2.s3hrjyxm.pojo.Role;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Service
public class RoleServiceImp implements RoleService{
          @Autowired
          RoleDao dao;

    @Override
    public List<Role> RoleQuery() {
        return dao.RoleQuery();
    }

    @Override
    @Transactional
    public void roleadd(Role r) {
             dao.roleadd(r);
    }

    @Override
    public Role RoleQuerybyid(int role_Id) {
        return dao.RoleQuerybyid(role_Id);
    }

    @Transactional
    @Override
    public void roledelete(int role_id) {
             dao.roledelete(role_id);
    }
   @Transactional
    @Override
    public int roleupdate(Role role) {
        return dao.roleupdate(role);
    }
}
